import com.example.RedisTemplate;
import com.example.SpringConfig;
import org.example.spring.AnnotationConfigApplicationContext;
import org.example.spring.ApplicationContext;
 
/**
 * @author heyunlin
 * @version 1.0
 */
public class Example {
 
    public static void main(String[] args) throws ClassNotFoundException {
        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(SpringConfig.class);
 
        Object redisTemplate1 = applicationContext.getBean(RedisTemplate.class);
        Object redisTemplate2 = applicationContext.getBean("redisTemplate");
 
        System.out.println(redisTemplate1);
        System.out.println(redisTemplate2);
    }
 
}